package org.millioncall.yueyoga.admin.service.impl;

import java.util.Map;

import org.millioncall.openplatform.common.PaginatedList;
import org.millioncall.yueyoga.admin.dao.TestDAO;
import org.millioncall.yueyoga.admin.model.TestSection;
import org.millioncall.yueyoga.admin.service.TestService;

public class TestServiceImpl implements TestService{
	private TestDAO testDAO;

	public TestDAO getTestDAO() {
		return testDAO;
	}

	public void setTestDAO(TestDAO testDAO) {
		this.testDAO = testDAO;
	}

	@Override
	public boolean addTest(Map<String, Object> map) {
		int i = testDAO.addTest(map);
		if(i>0){
			return true;
		}else{
			return false;
		}
	}

	@Override
	public PaginatedList<TestSection> findTestByMemberId(Map<String, Object> map, int start,
			int limit) {
		return testDAO.findTestByMemberId(map,start,limit);
	}
	@Override
	public boolean insert(TestSection testSection) {
		// TODO Auto-generated method stub
		int i= testDAO.insert(testSection);
		if(i==0){
			return false;
		}else{
			return true;
		}
	}
}
